<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>页面不存在 - 校园生活助手系统</title>
    <!-- 引入Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- 引入Font Awesome -->
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <!-- 引入自定义CSS -->
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
        
        :root {
            --primary-color: #165DFF;
            --secondary-color: #0A2463;
            --accent-color: #3E92CC;
            --text-color: #333;
            --text-light: #666;
            --bg-color: #F8F9FA;
            --card-bg: #fff;
            --border-radius: 12px;
            --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            --transition: all 0.3s ease;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Poppins', sans-serif;
            background-color: var(--bg-color);
            color: var(--text-color);
            line-height: 1.6;
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow-x: hidden;
        }
        
        body::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, rgba(22, 93, 255, 0.05), rgba(62, 146, 204, 0.05));
            z-index: -1;
        }
        
        .error-container {
            text-align: center;
            padding: 40px;
            max-width: 600px;
            margin: 20px;
            background-color: var(--card-bg);
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            animation: fadeIn 0.8s ease-out;
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .error-header {
            margin-bottom: 30px;
        }
        
        .error-code {
            font-size: 8rem;
            font-weight: 700;
            color: rgba(22, 93, 255, 0.1);
            position: relative;
            line-height: 1;
            margin-bottom: 20px;
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.02);
            }
            100% {
                transform: scale(1);
            }
        }
        
        .error-code::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 200px;
            height: 200px;
            background: radial-gradient(circle, rgba(22, 93, 255, 0.05), transparent 70%);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            animation: ripple 3s infinite;
        }
        
        @keyframes ripple {
            0% {
                transform: translate(-50%, -50%) scale(0.8);
                opacity: 1;
            }
            100% {
                transform: translate(-50%, -50%) scale(1.5);
                opacity: 0;
            }
        }
        
        .error-icon {
            font-size: 4rem;
            color: var(--primary-color);
            margin-bottom: 20px;
            animation: float 3s ease-in-out infinite;
        }
        
        @keyframes float {
            0%, 100% {
                transform: translateY(0);
            }
            50% {
                transform: translateY(-15px);
            }
        }
        
        .error-title {
            font-size: 2rem;
            font-weight: 600;
            color: var(--secondary-color);
            margin-bottom: 15px;
        }
        
        .error-description {
            color: var(--text-light);
            font-size: 1.1rem;
            margin-bottom: 30px;
            line-height: 1.7;
        }
        
        .error-suggestions {
            background-color: rgba(22, 93, 255, 0.05);
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 30px;
            text-align: left;
        }
        
        .error-suggestions h4 {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--secondary-color);
            margin-bottom: 15px;
            display: flex;
            align-items: center;
        }
        
        .error-suggestions h4 i {
            margin-right: 10px;
            color: var(--primary-color);
        }
        
        .suggestion-list {
            list-style: none;
            padding: 0;
        }
        
        .suggestion-item {
            display: flex;
            align-items: flex-start;
            margin-bottom: 10px;
            padding-left: 5px;
        }
        
        .suggestion-item:last-child {
            margin-bottom: 0;
        }
        
        .suggestion-item i {
            color: var(--primary-color);
            margin-right: 10px;
            margin-top: 5px;
            font-size: 0.8rem;
        }
        
        .suggestion-item span {
            color: var(--text-color);
            font-size: 0.95rem;
        }
        
        .error-actions {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 15px;
            margin-top: 30px;
        }
        
        .btn {
            padding: 12px 24px;
            border-radius: 8px;
            font-weight: 500;
            text-decoration: none;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            border: none;
            cursor: pointer;
            font-size: 1rem;
        }
        
        .btn-primary {
            background-color: var(--primary-color);
            color: white;
        }
        
        .btn-primary:hover {
            background-color: var(--secondary-color);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(22, 93, 255, 0.3);
            color: white;
        }
        
        .btn-secondary {
            background-color: #fff;
            color: var(--text-color);
            border: 1px solid #E5E7EB;
        }
        
        .btn-secondary:hover {
            background-color: #F3F4F6;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }
        
        .back-to-home {
            margin-top: 20px;
        }
        
        .back-to-home a {
            color: var(--primary-color);
            text-decoration: none;
            transition: var(--transition);
            font-size: 0.9rem;
        }
        
        .back-to-home a:hover {
            text-decoration: underline;
            color: var(--secondary-color);
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .error-container {
                padding: 30px 20px;
                margin: 10px;
            }
            
            .error-code {
                font-size: 6rem;
            }
            
            .error-title {
                font-size: 1.8rem;
            }
            
            .error-description {
                font-size: 1rem;
            }
            
            .error-actions {
                flex-direction: column;
            }
            
            .btn {
                width: 100%;
            }
        }
        
        @media (max-width: 480px) {
            body {
                align-items: flex-start;
                padding-top: 50px;
                height: auto;
                min-height: 100vh;
            }
            
            .error-code {
                font-size: 5rem;
            }
            
            .error-icon {
                font-size: 3rem;
            }
            
            .error-title {
                font-size: 1.6rem;
            }
        }
    </style>
</head>
<body>
    <div class="error-container">
        <div class="error-header">
            <div class="error-code">404</div>
            <i class="fa fa-map-marker error-icon"></i>
            <h1 class="error-title">页面不存在</h1>
            <p class="error-description">
                抱歉，您访问的页面不存在或已被移除。
                请检查您输入的URL是否正确，或尝试从网站首页重新导航。
            </p>
        </div>
        
        <div class="error-suggestions">
            <h4><i class="fa fa-lightbulb-o"></i> 可能的原因</h4>
            <ul class="suggestion-list">
                <li class="suggestion-item">
                    <i class="fa fa-circle"></i>
                    <span>URL输入错误或链接已过期</span>
                </li>
                <li class="suggestion-item">
                    <i class="fa fa-circle"></i>
                    <span>页面已被移动或删除</span>
                </li>
                <li class="suggestion-item">
                    <i class="fa fa-circle"></i>
                    <span>服务器暂时无法访问该页面</span>
                </li>
            </ul>
        </div>
        
        <div class="error-actions">
            <a href="{{ url_for('index') }}" class="btn btn-primary">
                <i class="fa fa-home"></i>
                返回首页
            </a>
            <a href="javascript:history.back()" class="btn btn-secondary">
                <i class="fa fa-arrow-left"></i>
                返回上一页
            </a>
        </div>
        
        <div class="back-to-home">
            <a href="{{ url_for('index') }}">校园生活助手系统 <i class="fa fa-angle-right"></i></a>
        </div>
    </div>

    <!-- 引入Bootstrap JS -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 添加页面载入动画效果
            document.body.style.opacity = '0';
            setTimeout(function() {
                document.body.style.transition = 'opacity 0.8s ease';
                document.body.style.opacity = '1';
            }, 100);
            
            // 添加错误页面统计（实际项目中可以添加错误日志记录）
            console.log('404 Error: Page not found');
            
            // 为按钮添加额外的交互效果
            const buttons = document.querySelectorAll('.btn');
            buttons.forEach(button => {
                button.addEventListener('mousedown', function() {
                    this.style.transform = 'translateY(0)';
                });
                
                button.addEventListener('mouseup', function() {
                    this.style.transform = 'translateY(-2px)';
                });
            });
            
            // 如果是从其他页面跳转过来的，显示提示消息
            if (document.referrer) {
                console.log('Referrer:', document.referrer);
                // 实际项目中可以根据来源页面提供更具体的建议
            }
        });
    </script>
</body>
</html>